# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Josip Ponjavic <josipponjavic at gmail dot com>
# Contributor: Xu Fasheng <fasheng.xu[AT]gmail.com>

pkgname=deepin-polkit-agent
pkgver=6.0.5
pkgrel=1
pkgdesc='Deepin Polkit Agent'
arch=('loong64' 'x86_64')
url="https://github.com/linuxdeepin/dde-polkit-agent"
license=('GPL3')
depends=('deepin-qt5integration' 'polkit-qt5' 'dtkcore' 'dtkgui' 'dtkwidget' 'qt5-base' 'gcc-libs')
makedepends=('cmake' 'ninja' 'qt5-tools')
groups=('deepin')
source=("https://github.com/linuxdeepin/dde-polkit-agent/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('33b23801127fb5ffc95e3c1432ec1f29b0c616762cd03fca4c275f8fa615aa37604c353c7f7751bd6a03285aeab1ea932a8e17360913f3349f477c017ffa0e5f')

build() {
  cd dde-polkit-agent-$pkgver
  cmake . -G Ninja \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DUSE_DEEPIN_POLKIT=OFF
  ninja
}

package() {
  cd dde-polkit-agent-$pkgver
  DESTDIR="$pkgdir" ninja install
}
